﻿using System;
using System.Globalization;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using System.IO;
using System.Windows.Forms;

namespace System
{
	public class Obj3G
	{
		public V3G Position;
		public double Heading;
		public double Speed;
		public double ACC;
		public double ROT;

		public Obj3G(double longit, double latit, double elev, double hdg)
		{
			Position = new V3G(longit, latit);
			Elevation = elev;
			Heading = hdg;
			Speed = ACC = ROT = Climb = ROC = 0;
		}
		void UpdatePosition(double dt)
		{
			Speed += ACC * dt;
			Heading += ROT * dt;
			Position.Move(Heading, Speed * dt, out Heading);
		}

		public double Elevation;
		public double Climb;
		public double ROC;
		void UpdateElevation(double dt)
		{
			Climb += ROC * dt;
			Elevation += Climb * dt;
		}
		public virtual void Process(double dt)
		{
			UpdatePosition(dt);
			UpdateElevation(dt);
		}
	}
}